package se.webbzon.boltzmann.menu;

import java.awt.Color;
import java.awt.Font;
import java.awt.Image;

import se.webbzon.oschi01.resourceset.ResourceSet;

public class LabelLayout extends TextLayout {
	
	// The position of the text relative to the label
	private final int textX, textY;
	
	// The image set of the label
	private final ResourceSet<Image> labelShort, labelLong;

	/*============================================================
	Constructors
	============================================================*/
	
	public LabelLayout( int textX, int textY,
						Font font,
						ResourceSet<Image> labelShort,
						ResourceSet<Image> labelLong) {
		super(font,Color.white);
		this.textX = textX;
		this.textY = textY;
		this.labelShort = labelShort;
		this.labelLong = labelLong;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the horizontal position of the text relative to
	 * the game menu item. **/
	public int getTextX() {
		return textX;
	}
	
	/** Returns the vertical position of the text relative to
	 * the game menu item. **/
	public int getTextY() {
		return textY;
	}
	
	/** Returns the image used for the label. **/
	public ResourceSet<Image> getLabelImage(boolean isLong) {
		return isLong ? labelLong : labelShort;
	}

}
